// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   QPX Express API Version v1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='http://developers.google.com/qpx-express'>QPX Express API</a>
 *      <tr><th>API Version<td>v1
 *      <tr><th>API Rev<td>20160708 (554)
 *      <tr><th>API Docs
 *          <td><a href='http://developers.google.com/qpx-express'>
 *              http://developers.google.com/qpx-express</a>
 *      <tr><th>Discovery Name<td>qpxExpress
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using QPX Express API can be found at
 * <a href='http://developers.google.com/qpx-express'>http://developers.google.com/qpx-express</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.QPXExpress.v1
{
    /// <summary>The QPXExpress Service.</summary>
    public class QPXExpressService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public QPXExpressService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public QPXExpressService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            trips = new TripsResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "qpxExpress"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/qpxExpress/v1/trips/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "qpxExpress/v1/trips/"; }
        }





        private readonly TripsResource trips;

        /// <summary>Gets the Trips resource.</summary>
        public virtual TripsResource Trips
        {
            get { return trips; }
        }
    }

    ///<summary>A base abstract class for QPXExpress requests.</summary>
    public abstract class QPXExpressBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new QPXExpressBaseServiceRequest instance.</summary>
        protected QPXExpressBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes QPXExpress parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "trips" collection of methods.</summary>
    public class TripsResource
    {
        private const string Resource = "trips";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public TripsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Returns a list of flights.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual SearchRequest Search(Google.Apis.QPXExpress.v1.Data.TripsSearchRequest body)
        {
            return new SearchRequest(service, body);
        }

        /// <summary>Returns a list of flights.</summary>
        public class SearchRequest : QPXExpressBaseServiceRequest<Google.Apis.QPXExpress.v1.Data.TripsSearchResponse>
        {
            /// <summary>Constructs a new Search request.</summary>
            public SearchRequest(Google.Apis.Services.IClientService service, Google.Apis.QPXExpress.v1.Data.TripsSearchRequest body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.QPXExpress.v1.Data.TripsSearchRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "search"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "search"; }
            }

            /// <summary>Initializes Search parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }
    }
}

namespace Google.Apis.QPXExpress.v1.Data
{    

    /// <summary>The make, model, and type of an aircraft.</summary>
    public class AircraftData : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The aircraft code. For example, for a Boeing 777 the code would be 777.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; } 

        /// <summary>Identifies this as an aircraftData object. Value: the fixed string
        /// qpxexpress#aircraftData</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The name of an aircraft, for example Boeing 777.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An airport.</summary>
    public class AirportData : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The city code an airport is located in. For example, for JFK airport, this is NYC.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("city")]
        public virtual string City { get; set; } 

        /// <summary>An airport's code. For example, for Boston Logan airport, this is BOS.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; } 

        /// <summary>Identifies this as an airport object. Value: the fixed string qpxexpress#airportData.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The name of an airport. For example, for airport BOS the name is "Boston Logan
        /// International".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Information about an item of baggage.</summary>
    public class BagDescriptor : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Provides the commercial name for an optional service.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("commercialName")]
        public virtual string CommercialName { get; set; } 

        /// <summary>How many of this type of bag will be checked on this flight.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("count")]
        public virtual System.Nullable<int> Count { get; set; } 

        /// <summary>A description of the baggage.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual System.Collections.Generic.IList<string> Description { get; set; } 

        /// <summary>Identifies this as a baggage object. Value: the fixed string qpxexpress#bagDescriptor.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The standard IATA subcode used to identify this optional service.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("subcode")]
        public virtual string Subcode { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Information about a carrier (ie. an airline, bus line, railroad, etc) that might be useful to display
    /// to an end-user.</summary>
    public class CarrierData : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The IATA designator of a carrier (airline, etc). For example, for American Airlines, the code is
        /// AA.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; } 

        /// <summary>Identifies this as a kind of carrier (ie. an airline, bus line, railroad, etc). Value: the fixed
        /// string qpxexpress#carrierData.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The long, full name of a carrier. For example: American Airlines.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Information about a city that might be useful to an end-user; typically the city of an
    /// airport.</summary>
    public class CityData : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The IATA character ID of a city. For example, for Boston this is BOS.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; } 

        /// <summary>The two-character country code of the country the city is located in. For example, US for the
        /// United States of America.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("country")]
        public virtual string Country { get; set; } 

        /// <summary>Identifies this as a city, typically with one or more airports. Value: the fixed string
        /// qpxexpress#cityData.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The full name of a city. An example would be: New York.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Detailed information about components found in the solutions of this response, including a trip's
    /// airport, city, taxes, airline, and aircraft.</summary>
    public class Data : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The aircraft that is flying between an origin and destination.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("aircraft")]
        public virtual System.Collections.Generic.IList<AircraftData> Aircraft { get; set; } 

        /// <summary>The airport of an origin or destination.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("airport")]
        public virtual System.Collections.Generic.IList<AirportData> Airport { get; set; } 

        /// <summary>The airline carrier of the aircraft flying between an origin and destination. Allowed values are
        /// IATA carrier codes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("carrier")]
        public virtual System.Collections.Generic.IList<CarrierData> Carrier { get; set; } 

        /// <summary>The city that is either the origin or destination of part of a trip.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("city")]
        public virtual System.Collections.Generic.IList<CityData> City { get; set; } 

        /// <summary>Identifies this as QPX Express response resource, including a trip's airport, city, taxes, airline,
        /// and aircraft. Value: the fixed string qpxexpress#data.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The taxes due for flying between an origin and a destination.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tax")]
        public virtual System.Collections.Generic.IList<TaxData> Tax { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Complete information about a fare used in the solution to a low-fare search query. In the airline
    /// industry a fare is a price an airline charges for one-way travel between two points. A fare typically contains a
    /// carrier code, two city codes, a price, and a fare basis. (A fare basis is a one-to-eight character alphanumeric
    /// code used to identify a fare.)</summary>
    public class FareInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("basisCode")]
        public virtual string BasisCode { get; set; } 

        /// <summary>The carrier of the aircraft or other vehicle commuting between two points.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("carrier")]
        public virtual string Carrier { get; set; } 

        /// <summary>The city code of the city the trip ends at.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destination")]
        public virtual string Destination { get; set; } 

        /// <summary>A unique identifier of the fare.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Identifies this as a fare object. Value: the fixed string qpxexpress#fareInfo.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The city code of the city the trip begins at.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("origin")]
        public virtual string Origin { get; set; } 

        /// <summary>Whether this is a private fare, for example one offered only to select customers rather than the
        /// general public.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("private")]
        public virtual System.Nullable<bool> Private__ { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A flight is a sequence of legs with the same airline carrier and flight number. (A leg is the smallest
    /// unit of travel, in the case of a flight a takeoff immediately followed by a landing at two set points on a
    /// particular carrier with a particular flight number.) The naive view is that a flight is scheduled travel of an
    /// aircraft between two points, with possibly intermediate stops, but carriers will frequently list flights that
    /// require a change of aircraft between legs.</summary>
    public class FlightInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("carrier")]
        public virtual string Carrier { get; set; } 

        /// <summary>The flight number.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("number")]
        public virtual string Number { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Information about free baggage allowed on one segment of a trip.</summary>
    public class FreeBaggageAllowance : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A representation of a type of bag, such as an ATPCo subcode, Commercial Name, or other
        /// description.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bagDescriptor")]
        public virtual System.Collections.Generic.IList<BagDescriptor> BagDescriptor { get; set; } 

        /// <summary>The maximum number of kilos all the free baggage together may weigh.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kilos")]
        public virtual System.Nullable<int> Kilos { get; set; } 

        /// <summary>The maximum number of kilos any one piece of baggage may weigh.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kilosPerPiece")]
        public virtual System.Nullable<int> KilosPerPiece { get; set; } 

        /// <summary>Identifies this as free baggage object, allowed on one segment of a trip. Value: the fixed string
        /// qpxexpress#freeBaggageAllowance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The number of free pieces of baggage allowed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("pieces")]
        public virtual System.Nullable<int> Pieces { get; set; } 

        /// <summary>The number of pounds of free baggage allowed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("pounds")]
        public virtual System.Nullable<int> Pounds { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Information about a leg. (A leg is the smallest unit of travel, in the case of a flight a takeoff
    /// immediately followed by a landing at two set points on a particular carrier with a particular flight
    /// number.)</summary>
    public class LegInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The aircraft (or bus, ferry, railcar, etc) travelling between the two points of this leg.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("aircraft")]
        public virtual string Aircraft { get; set; } 

        /// <summary>The scheduled time of arrival at the destination of the leg, local to the point of
        /// arrival.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("arrivalTime")]
        public virtual string ArrivalTime { get; set; } 

        /// <summary>Whether you have to change planes following this leg. Only applies to the next leg.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("changePlane")]
        public virtual System.Nullable<bool> ChangePlane { get; set; } 

        /// <summary>Duration of a connection following this leg, in minutes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("connectionDuration")]
        public virtual System.Nullable<int> ConnectionDuration { get; set; } 

        /// <summary>The scheduled departure time of the leg, local to the point of departure.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("departureTime")]
        public virtual string DepartureTime { get; set; } 

        /// <summary>The leg destination as a city and airport.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destination")]
        public virtual string Destination { get; set; } 

        /// <summary>The terminal the flight is scheduled to arrive at.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destinationTerminal")]
        public virtual string DestinationTerminal { get; set; } 

        /// <summary>The scheduled travelling time from the origin to the destination.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("duration")]
        public virtual System.Nullable<int> Duration { get; set; } 

        /// <summary>An identifier that uniquely identifies this leg in the solution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Identifies this as a leg object. A leg is the smallest unit of travel, in the case of a flight a
        /// takeoff immediately followed by a landing at two set points on a particular carrier with a particular flight
        /// number. Value: the fixed string qpxexpress#legInfo.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A simple, general description of the meal(s) served on the flight, for example: "Hot
        /// meal".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("meal")]
        public virtual string Meal { get; set; } 

        /// <summary>The number of miles in this leg.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mileage")]
        public virtual System.Nullable<int> Mileage { get; set; } 

        /// <summary>In percent, the published on time performance on this leg.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("onTimePerformance")]
        public virtual System.Nullable<int> OnTimePerformance { get; set; } 

        /// <summary>Department of Transportation disclosure information on the actual operator of a flight in a code
        /// share. (A code share refers to a marketing agreement between two carriers, where one carrier will list in
        /// its schedules (and take bookings for) flights that are actually operated by another carrier.)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operatingDisclosure")]
        public virtual string OperatingDisclosure { get; set; } 

        /// <summary>The leg origin as a city and airport.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("origin")]
        public virtual string Origin { get; set; } 

        /// <summary>The terminal the flight is scheduled to depart from.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("originTerminal")]
        public virtual string OriginTerminal { get; set; } 

        /// <summary>Whether passenger information must be furnished to the United States Transportation Security
        /// Administration (TSA) prior to departure.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("secure")]
        public virtual System.Nullable<bool> Secure { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The number and type of passengers. Unfortunately the definition of an infant, child, adult, and senior
    /// citizen varies across carriers and reservation systems.</summary>
    public class PassengerCounts : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The number of passengers that are adults.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("adultCount")]
        public virtual System.Nullable<int> AdultCount { get; set; } 

        /// <summary>The number of passengers that are children.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("childCount")]
        public virtual System.Nullable<int> ChildCount { get; set; } 

        /// <summary>The number of passengers that are infants travelling in the lap of an adult.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("infantInLapCount")]
        public virtual System.Nullable<int> InfantInLapCount { get; set; } 

        /// <summary>The number of passengers that are infants each assigned a seat.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("infantInSeatCount")]
        public virtual System.Nullable<int> InfantInSeatCount { get; set; } 

        /// <summary>Identifies this as a passenger count object, representing the number of passengers. Value: the
        /// fixed string qpxexpress#passengerCounts.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The number of passengers that are senior citizens.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("seniorCount")]
        public virtual System.Nullable<int> SeniorCount { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The price of one or more travel segments. The currency used to purchase tickets is usually determined
    /// by the sale/ticketing city or the sale/ticketing country, unless none are specified, in which case it defaults
    /// to that of the journey origin country.</summary>
    public class PricingInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The total fare in the base fare currency (the currency of the country of origin). This element is
        /// only present when the sales currency and the currency of the country of commencement are
        /// different.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("baseFareTotal")]
        public virtual string BaseFareTotal { get; set; } 

        /// <summary>The fare used to price one or more segments.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fare")]
        public virtual System.Collections.Generic.IList<FareInfo> Fare { get; set; } 

        /// <summary>The horizontal fare calculation. This is a field on a ticket that displays all of the relevant
        /// items that go into the calculation of the fare.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fareCalculation")]
        public virtual string FareCalculation { get; set; } 

        /// <summary>Identifies this as a pricing object, representing the price of one or more travel segments. Value:
        /// the fixed string qpxexpress#pricingInfo.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The latest ticketing time for this pricing assuming the reservation occurs at ticketing time and
        /// there is no change in fares/rules. The time is local to the point of sale (POS).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("latestTicketingTime")]
        public virtual string LatestTicketingTime { get; set; } 

        /// <summary>The number of passengers to which this price applies.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("passengers")]
        public virtual PassengerCounts Passengers { get; set; } 

        /// <summary>The passenger type code for this pricing. An alphanumeric code used by a carrier to restrict fares
        /// to certain categories of passenger. For instance, a fare might be valid only for senior citizens.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ptc")]
        public virtual string Ptc { get; set; } 

        /// <summary>Whether the fares on this pricing are refundable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("refundable")]
        public virtual System.Nullable<bool> Refundable { get; set; } 

        /// <summary>The total fare in the sale or equivalent currency.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("saleFareTotal")]
        public virtual string SaleFareTotal { get; set; } 

        /// <summary>The taxes in the sale or equivalent currency.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("saleTaxTotal")]
        public virtual string SaleTaxTotal { get; set; } 

        /// <summary>Total per-passenger price (fare and tax) in the sale or equivalent currency.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("saleTotal")]
        public virtual string SaleTotal { get; set; } 

        /// <summary>The per-segment price and baggage information.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("segmentPricing")]
        public virtual System.Collections.Generic.IList<SegmentPricing> SegmentPricing { get; set; } 

        /// <summary>The taxes used to calculate the tax total per ticket.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tax")]
        public virtual System.Collections.Generic.IList<TaxInfo> Tax { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Details of a segment of a flight; a segment is one or more consecutive legs on the same flight. For
    /// example a hypothetical flight ZZ001, from DFW to OGG, would have one segment with two legs: DFW to HNL (leg 1),
    /// HNL to OGG (leg 2), and DFW to OGG (legs 1 and 2).</summary>
    public class SegmentInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The booking code or class for this segment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bookingCode")]
        public virtual string BookingCode { get; set; } 

        /// <summary>The number of seats available in this booking code on this segment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bookingCodeCount")]
        public virtual System.Nullable<int> BookingCodeCount { get; set; } 

        /// <summary>The cabin booked for this segment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cabin")]
        public virtual string Cabin { get; set; } 

        /// <summary>In minutes, the duration of the connection following this segment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("connectionDuration")]
        public virtual System.Nullable<int> ConnectionDuration { get; set; } 

        /// <summary>The duration of the flight segment in minutes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("duration")]
        public virtual System.Nullable<int> Duration { get; set; } 

        /// <summary>The flight this is a segment of.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("flight")]
        public virtual FlightInfo Flight { get; set; } 

        /// <summary>An id uniquely identifying the segment in the solution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Identifies this as a segment object. A segment is one or more consecutive legs on the same flight.
        /// For example a hypothetical flight ZZ001, from DFW to OGG, could have one segment with two legs: DFW to HNL
        /// (leg 1), HNL to OGG (leg 2). Value: the fixed string qpxexpress#segmentInfo.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The legs composing this segment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("leg")]
        public virtual System.Collections.Generic.IList<LegInfo> Leg { get; set; } 

        /// <summary>The solution-based index of a segment in a married segment group. Married segments can only be
        /// booked together. For example, an airline might report a certain booking code as sold out from Boston to
        /// Pittsburgh, but as available as part of two married segments Boston to Chicago connecting through
        /// Pittsburgh. For example content of this field, consider the round-trip flight ZZ1 PHX-PHL ZZ2 PHL-CLT ZZ3
        /// CLT-PHX. This has three segments, with the two outbound ones (ZZ1 ZZ2) married. In this case, the two
        /// outbound segments belong to married segment group 0, and the return segment belongs to married segment group
        /// 1.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("marriedSegmentGroup")]
        public virtual string MarriedSegmentGroup { get; set; } 

        /// <summary>Whether the operation of this segment remains subject to government approval.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("subjectToGovernmentApproval")]
        public virtual System.Nullable<bool> SubjectToGovernmentApproval { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The price of this segment.</summary>
    public class SegmentPricing : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A segment identifier unique within a single solution. It is used to refer to different parts of the
        /// same solution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fareId")]
        public virtual string FareId { get; set; } 

        /// <summary>Details of the free baggage allowance on this segment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("freeBaggageOption")]
        public virtual System.Collections.Generic.IList<FreeBaggageAllowance> FreeBaggageOption { get; set; } 

        /// <summary>Identifies this as a segment pricing object, representing the price of this segment. Value: the
        /// fixed string qpxexpress#segmentPricing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Unique identifier in the response of this segment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("segmentId")]
        public virtual string SegmentId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Information about a slice. A slice represents a traveller's intent, the portion of a low-fare search
    /// corresponding to a traveler's request to get between two points. One-way journeys are generally expressed using
    /// 1 slice, round-trips using 2. For example, if a traveler specifies the following trip in a user interface: |
    /// Origin | Destination | Departure Date | | BOS | LAX | March 10, 2007 | | LAX | SYD | March 17, 2007 | | SYD |
    /// BOS | March 22, 2007 | then this is a three slice trip.</summary>
    public class SliceInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The duration of the slice in minutes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("duration")]
        public virtual System.Nullable<int> Duration { get; set; } 

        /// <summary>Identifies this as a slice object. A slice represents a traveller's intent, the portion of a low-
        /// fare search corresponding to a traveler's request to get between two points. One-way journeys are generally
        /// expressed using 1 slice, round-trips using 2. Value: the fixed string qpxexpress#sliceInfo.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The segment(s) constituting the slice.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("segment")]
        public virtual System.Collections.Generic.IList<SegmentInfo> Segment { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Criteria a desired slice must satisfy.</summary>
    public class SliceInput : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Slices with only the carriers in this alliance should be returned; do not use this field with
        /// permittedCarrier. Allowed values are ONEWORLD, SKYTEAM, and STAR.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("alliance")]
        public virtual string Alliance { get; set; } 

        /// <summary>Departure date in YYYY-MM-DD format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("date")]
        public virtual string Date { get; set; } 

        /// <summary>Airport or city IATA designator of the destination.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destination")]
        public virtual string Destination { get; set; } 

        /// <summary>Identifies this as a slice input object, representing the criteria a desired slice must satisfy.
        /// Value: the fixed string qpxexpress#sliceInput.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The longest connection between two legs, in minutes, you are willing to accept.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxConnectionDuration")]
        public virtual System.Nullable<int> MaxConnectionDuration { get; set; } 

        /// <summary>The maximum number of stops you are willing to accept in this slice.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxStops")]
        public virtual System.Nullable<int> MaxStops { get; set; } 

        /// <summary>Airport or city IATA designator of the origin.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("origin")]
        public virtual string Origin { get; set; } 

        /// <summary>A list of 2-letter IATA airline designators. Slices with only these carriers should be
        /// returned.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("permittedCarrier")]
        public virtual System.Collections.Generic.IList<string> PermittedCarrier { get; set; } 

        /// <summary>Slices must depart in this time of day range, local to the point of departure.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("permittedDepartureTime")]
        public virtual TimeOfDayRange PermittedDepartureTime { get; set; } 

        /// <summary>Prefer solutions that book in this cabin for this slice. Allowed values are COACH, PREMIUM_COACH,
        /// BUSINESS, and FIRST.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("preferredCabin")]
        public virtual string PreferredCabin { get; set; } 

        /// <summary>A list of 2-letter IATA airline designators. Exclude slices that use these carriers.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("prohibitedCarrier")]
        public virtual System.Collections.Generic.IList<string> ProhibitedCarrier { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Tax data.</summary>
    public class TaxData : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>An identifier uniquely identifying a tax in a response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Identifies this as a tax data object, representing some tax. Value: the fixed string
        /// qpxexpress#taxData.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The name of a tax.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Tax information.</summary>
    public class TaxInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether this is a government charge or a carrier surcharge.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("chargeType")]
        public virtual string ChargeType { get; set; } 

        /// <summary>The code to enter in the ticket's tax box.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; } 

        /// <summary>For government charges, the country levying the charge.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("country")]
        public virtual string Country { get; set; } 

        /// <summary>Identifier uniquely identifying this tax in a response. Not present for unnamed carrier
        /// surcharges.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Identifies this as a tax information object. Value: the fixed string qpxexpress#taxInfo.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The price of the tax in the sales or equivalent currency.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("salePrice")]
        public virtual string SalePrice { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Two times in a single day defining a time range.</summary>
    public class TimeOfDayRange : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The earliest time of day in HH:MM format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("earliestTime")]
        public virtual string EarliestTime { get; set; } 

        /// <summary>Identifies this as a time of day range object, representing two times in a single day defining a
        /// time range. Value: the fixed string qpxexpress#timeOfDayRange.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The latest time of day in HH:MM format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("latestTime")]
        public virtual string LatestTime { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Trip information.</summary>
    public class TripOption : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifier uniquely identifying this trip in a response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Identifies this as a trip information object. Value: the fixed string
        /// qpxexpress#tripOption.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Per passenger pricing information.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("pricing")]
        public virtual System.Collections.Generic.IList<PricingInfo> Pricing { get; set; } 

        /// <summary>The total price for all passengers on the trip, in the form of a currency followed by an amount,
        /// e.g. USD253.35.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("saleTotal")]
        public virtual string SaleTotal { get; set; } 

        /// <summary>The slices that make up this trip's itinerary.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("slice")]
        public virtual System.Collections.Generic.IList<SliceInfo> Slice { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A QPX Express search request, which will yield one or more solutions.</summary>
    public class TripOptionsRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Do not return solutions that cost more than this price. The alphabetical part of the price is in
        /// ISO 4217. The format, in regex, is [A-Z]{3}\d+(\.\d+)? Example: $102.07</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxPrice")]
        public virtual string MaxPrice { get; set; } 

        /// <summary>Counts for each passenger type in the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("passengers")]
        public virtual PassengerCounts Passengers { get; set; } 

        /// <summary>Return only solutions with refundable fares.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("refundable")]
        public virtual System.Nullable<bool> Refundable { get; set; } 

        /// <summary>IATA country code representing the point of sale. This determines the "equivalent amount paid"
        /// currency for the ticket.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("saleCountry")]
        public virtual string SaleCountry { get; set; } 

        /// <summary>The slices that make up the itinerary of this trip. A slice represents a traveler's intent, the
        /// portion of a low-fare search corresponding to a traveler's request to get between two points. One-way
        /// journeys are generally expressed using one slice, round-trips using two. An example of a one slice trip with
        /// three segments might be BOS-SYD, SYD-LAX, LAX-BOS if the traveler only stopped in SYD and LAX just long
        /// enough to change planes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("slice")]
        public virtual System.Collections.Generic.IList<SliceInput> Slice { get; set; } 

        /// <summary>The number of solutions to return, maximum 500.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("solutions")]
        public virtual System.Nullable<int> Solutions { get; set; } 

        /// <summary>IATA country code representing the point of ticketing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ticketingCountry")]
        public virtual string TicketingCountry { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A QPX Express search response.</summary>
    public class TripOptionsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Informational data global to list of solutions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("data")]
        public virtual Data Data { get; set; } 

        /// <summary>Identifies this as a QPX Express trip response object, which consists of zero or more solutions.
        /// Value: the fixed string qpxexpress#tripOptions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>An identifier uniquely identifying this response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requestId")]
        public virtual string RequestId { get; set; } 

        /// <summary>A list of priced itinerary solutions to the QPX Express query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tripOption")]
        public virtual System.Collections.Generic.IList<TripOption> TripOption { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A QPX Express search request.</summary>
    public class TripsSearchRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A QPX Express search request. Required values are at least one adult or senior passenger, an
        /// origin, a destination, and a date.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("request")]
        public virtual TripOptionsRequest Request { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A QPX Express search response.</summary>
    public class TripsSearchResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies this as a QPX Express API search response resource. Value: the fixed string
        /// qpxExpress#tripsSearch.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>All possible solutions to the QPX Express search request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("trips")]
        public virtual TripOptionsResponse Trips { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
